﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"
    CodeBehind="RegisterUser.aspx.cs" Inherits="ebookstore.RegisterUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <!-- MultiView with two Views -->
            <asp:MultiView ID="MultiView1" runat="server">
                <!-- User Registration View -->
                <asp:View ID="registrationView" runat="server">
                    <p>
                        <strong>User Registration</strong></p>
                    <table>
                        <tr>
                            <td>
                                Firstname:
                            </td>
                            <td>
                                <asp:TextBox ID="firstnameTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="firstnameValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="firstnameTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Lastname:
                            </td>
                            <td>
                                <asp:TextBox ID="lastnameTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="lastnameValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="lastnameTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email:
                            </td>
                            <td>
                                <asp:TextBox ID="emailTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="emailValidator2" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="emailTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="emailValidator" runat="server" ErrorMessage="Wrong Email Syntax!"
                                    ControlToValidate="emailTextBox" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                    ForeColor="Red"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Username:
                            </td>
                            <td>
                                <asp:TextBox ID="usernameTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="usernameValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="usernameTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Password:
                            </td>
                            <td>
                                <asp:TextBox ID="passwordTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="passwordValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="passwordTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Confirm Password:
                            </td>
                            <td>
                                <asp:TextBox ID="confirmPasswordTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="confirmPasswordValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="confirmPasswordTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Address:
                            </td>
                            <td>
                                <asp:TextBox ID="addressTextBox" runat="server" TextMode="MultiLine"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="addressValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="addressTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Telephone:
                            </td>
                            <td>
                                <asp:TextBox ID="telephoneTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="telephoneValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="telephoneTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ZIP Code:
                            </td>
                            <td>
                                <asp:TextBox ID="zipCodeTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="zipCodeValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="zipCodeTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                City:
                            </td>
                            <td>
                                <asp:TextBox ID="cityTextBox" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="cityValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="cityTextBox" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Country:
                            </td>
                            <td>
                                <asp:DropDownList ID="countryDropDownList" runat="server">
                                    <asp:ListItem>Greece</asp:ListItem>
                                    <asp:ListItem>Germany</asp:ListItem>
                                    <asp:ListItem>France</asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="countryValidator" runat="server" ErrorMessage="Required Field!"
                                    ControlToValidate="countryDropDownList" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Gender:
                            </td>
                            <td>
                                <asp:RadioButtonList ID="genderRadioButtonList" runat="server">
                                    <asp:ListItem Selected="True">Male</asp:ListItem>
                                    <asp:ListItem>Female</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Accept Terms:
                            </td>
                            <td>
                                <asp:CheckBox ID="acceptTermsCheckBox" runat="server" />
                                <asp:Label ID="acceptTermsInfoLabel" runat="server" ForeColor="Red"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <asp:Button ID="registerButton" runat="server" Text="Register" OnClick="registerButton_Click" />
                            </td>
                        </tr>
                    </table>
                </asp:View>
                <!-- Registration User Details View -->
                <asp:View ID="confirmRegistrationView" runat="server">
                    <p>
                        <strong>Registration User Details </strong>
                    </p>
                    <table>
                        <tr>
                            <td>
                                Firstname:
                            </td>
                            <td>
                                <asp:Label ID="firstnameLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Lastname:
                            </td>
                            <td>
                                <asp:Label ID="lastnameLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email:
                            </td>
                            <td>
                                <asp:Label ID="emailLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Address:
                            </td>
                            <td>
                                <asp:Label ID="addressLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Telephone:
                            </td>
                            <td>
                                <asp:Label ID="telephoneLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ZIP Code:
                            </td>
                            <td>
                                <asp:Label ID="zipCodeLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                City:
                            </td>
                            <td>
                                <asp:Label ID="cityLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Country:
                            </td>
                            <td>
                                <asp:Label ID="countryLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Gender:
                            </td>
                            <td>
                                <asp:Label ID="genderLabel" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Confirm values:
                            </td>
                            <td>
                                <asp:Button ID="confirmButton" runat="server" Text="Confrim" />
                            </td>
                        </tr>
                    </table>
                </asp:View>
            </asp:MultiView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
